<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="app">
			<div>
				<label>年龄:</label>
				<input v-model="age" />
			</div>
			<div>当前输入的年龄是:{{age}}</div>
			<button @click="add">加一岁</button>
			<button @click="alertYear">弹出年龄</button>
		</div>
	</body>
	<script src="../Node/vue.js"></script>
	<script type="text/javascript">
		var vm = new Vue({
			el: "#app",
			data: {
				age: 18
			},
			methods: {
				add() {
					this.age = this.age + 1;
				},
				alertYear() {
					alert(this.age)
				}
			}
		})
	</script>
</html>
